<?php
//$this->include_jquery();
?>
<!doctype html>
<html lang="en">

    <head>
        <meta charset="utf-8"/>
        <?php //include 'control_head.php' ?>
        <title>Панель управления сайтом</title>
        <link rel="stylesheet" href="<?= Yii::app()->theme->baseUrl ?>/public/admin/css/layout.css" type="text/css" media="screen" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />
		

    </head>


    <body>

        <header id="header">
            <hgroup>
                <h1 class="site_title"><a href="/admin/">YII.CMS v.0.1</a></h1>
                <h2 class="section_title">Панель управления сайтом</h2><div class="btn_view_site"><a href="/">Главная</a></div>
                <?php if (Yii::app()->user->checkAccess('1')) : ?>
                    <div class="btn_view_admin"><a href="/superadmin">superadmin</a></div>
                <?php endif; ?>
            </hgroup>
        </header> <!-- end of header bar -->

        <section id="secondary_bar">
            <div class="user">
                <p><?= Yii::app()->user->name ?></p>
                <a class="logout_user" href="/main/logout" title="Выйти">Выйти</a>
            </div>
            <div class="breadcrumbs_container">

                <article class="breadcrumbs">
                    <?php if (isset($this->breadcrumbs)): ?>
                        <?php
                        $this->widget('zii.widgets.CBreadcrumbs', array(
                            'activeLinkTemplate' => '<a class="current" href="{url}">{label}</a>',
                            'inactiveLinkTemplate' => '<a href="#0">{label}</a>',
                            'separator' => '<div class="breadcrumb_divider"></div>',
                            'links' => $this->breadcrumbs,
                            //'homeLink' => CHtml::link(Yii::t('admin','Главная'),Yii::app()->homeUrl),
                            'homeLink' => CHtml::link(Yii::t('admin', 'Главная'), '/admin/'),
                        ));
                        ?><!-- breadcrumbs -->
<?php endif ?>    
                    <!--a href="index.html">Website Admin</a> <div class="breadcrumb_divider"></div> <a class="current">Dashboard</a> <div class="breadcrumb_divider"></div> <a class="current">Dashboard</a-->
                </article>

            </div>
        </section><!-- end of secondary bar -->

        <aside id="sidebar" class="column"> 
            <form class="quick_search">
                <input type="text" value="Поиск" onfocus="if (!this._haschanged) {
                            this.value = ''
                        }
                        ;
                        this._haschanged = true;">
            </form>
            <hr/>

            <?php /*  $this->widget('NavigationWidget', array(
              'alias' => 'admin_main_navigation',
              'template' => 'admin_level_1'
              )); */ ?>

            <?php
            $this->beginWidget('zii.widgets.CPortlet', array(
                'title' => 'Меню',
            ));

            $this->widget('zii.widgets.CMenu', array(
                'items' => array(
                    array('label' => 'Главная', 'url' => array('/admin')),
                    //	array('label'=>'About', 'url'=>array('/main/page', 'view'=>'about')),
                    array('label' => 'Категории', 'url' => array('/admin/category/category')),
                    array('label' => 'Категории новостей', 'url' => array('/admin/categoryNewsAdmin/categoryNews')),
                    array('label' => 'Новости', 'url' => array('/admin/newsAdmin/news')),
                    array('label' => 'Комментарии', 'url' => array('/admin/commentsAdmin/comments')),
                ),
            ));

            $this->endWidget();
            ?>

            <?php
            $this->beginWidget('zii.widgets.CPortlet', array(
                'title' => 'Действие',
            ));
            $this->widget('zii.widgets.CMenu', array(
                'items' => $this->menu,
                'htmlOptions' => array('class' => 'operations'),
            ));
            $this->endWidget();
            ?>

        </aside><!-- end of sidebar -->

        <section id="main" class="column">
<?php // $this->widget('UTIAdminFlashMessagesWidget');  ?>
            <article class="module width_full">
                <header><h3><?php echo CHtml::encode($this->pageTitle); ?></h3></header>
                <div class="module_content">
<?php echo $content; ?>
                    <div class="clear"></div>
                </div>
            </article><!-- end of stats article -->        

            <div class="spacer"></div>
        </section>

        <footer>    	
            <p><strong>Copyright &copy; <?= date('Y') ?> YII.CMS</strong></p>
        </footer>


    </body>

</html>